package cn.touna.jss.common.properties.disconf;

import cn.touna.jss.common.util.DateUtils;
import com.baidu.disconf.client.common.annotations.DisconfFile;
import com.baidu.disconf.client.common.annotations.DisconfFileItem;
import org.springframework.stereotype.Component;

/**
 * 车鉴定配置
 * Created by 吴柏平 on 2017/8/2.
 */
@Component
//@ConfigurationProperties(prefix = "carIdentify")
//@PropertySource("classpath:properties/car_identify.properties")
@DisconfFile(targetDirPath = "disconf", filename = "car_identify.properties")
public class CarIdentifyProperties {

    //私钥
    private String privateKey;

    //用户主键
    private String uid;

    //密码
    private String pwd;

    //服务器地址
    private String domain;

    //查询账户信息URL
    private String accountInfoUrl;

    //购买报告2.0版URL
    private String buyUrl;

    //查询订单状态URL
    private String orderInfoUrl;

    //用于签名的时间戳
    private String time = DateUtils.getCurrentLocal();

    //查询品牌是否支持URL
    private String checkBrandUrl;

    //通过行驶证图片购买报告URL
    private String buyByVinImgUrl;

    //查询品牌列表URL
    private String brandListUrl;

    //主动获取JSON报告数据URL
    private String reportDataUrl;

    //订单号缓存天数
    private int orderIdCacheDays = 1;

    //报告重试间隔
    private int reportRetryIntevalSecond = 5;
    //报告重试最大次数
    private int reportRetryMaxCount = 60;

    @DisconfFileItem(name = "carIdentify.privateKey", associateField = "privateKey")
    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    @DisconfFileItem(name = "carIdentify.uid", associateField = "uid")
    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    @DisconfFileItem(name = "carIdentify.pwd", associateField = "pwd")
    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @DisconfFileItem(name = "carIdentify.domain", associateField = "domain")
    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    @DisconfFileItem(name = "carIdentify.accountInfoUrl", associateField = "accountInfoUrl")
    public String getAccountInfoUrl() {
        return accountInfoUrl;
    }

    public void setAccountInfoUrl(String accountInfoUrl) {
        this.accountInfoUrl = accountInfoUrl;
    }

    @DisconfFileItem(name = "carIdentify.buyUrl", associateField = "buyUrl")
    public String getBuyUrl() {
        return buyUrl;
    }

    public void setBuyUrl(String buyUrl) {
        this.buyUrl = buyUrl;
    }

    @DisconfFileItem(name = "carIdentify.orderInfoUrl", associateField = "orderInfoUrl")
    public String getOrderInfoUrl() {
        return orderInfoUrl;
    }

    public void setOrderInfoUrl(String orderInfoUrl) {
        this.orderInfoUrl = orderInfoUrl;
    }

    @DisconfFileItem(name = "carIdentify.checkBrandUrl", associateField = "checkBrandUrl")
    public String getCheckBrandUrl() {
        return checkBrandUrl;
    }

    public void setCheckBrandUrl(String checkBrandUrl) {
        this.checkBrandUrl = checkBrandUrl;
    }

    @DisconfFileItem(name = "carIdentify.buyByVinImgUrl", associateField = "buyByVinImgUrl")
    public String getBuyByVinImgUrl() {
        return buyByVinImgUrl;
    }

    public void setBuyByVinImgUrl(String buyByVinImgUrl) {
        this.buyByVinImgUrl = buyByVinImgUrl;
    }

    @DisconfFileItem(name = "carIdentify.brandListUrl", associateField = "brandListUrl")
    public String getBrandListUrl() {
        return brandListUrl;
    }

    public void setBrandListUrl(String brandListUrl) {
        this.brandListUrl = brandListUrl;
    }

    @DisconfFileItem(name = "carIdentify.reportDataUrl", associateField = "reportDataUrl")
    public String getReportDataUrl() {
        return reportDataUrl;
    }

    public void setReportDataUrl(String reportDataUrl) {
        this.reportDataUrl = reportDataUrl;
    }

    @DisconfFileItem(name = "carIdentify.time", associateField = "time")
    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @DisconfFileItem(name = "carIdentify.orderIdCacheDays", associateField = "orderIdCacheDays")
    public int getOrderIdCacheDays() {
        return orderIdCacheDays;
    }

    public void setOrderIdCacheDays(int orderIdCacheDays) {
        this.orderIdCacheDays = orderIdCacheDays;
    }

    public int getReportRetryIntevalSecond() {
        return reportRetryIntevalSecond;
    }

    public void setReportRetryIntevalSecond(int reportRetryIntevalSecond) {
        this.reportRetryIntevalSecond = reportRetryIntevalSecond;
    }

    public int getReportRetryMaxCount() {
        return reportRetryMaxCount;
    }

    public void setReportRetryMaxCount(int reportRetryMaxCount) {
        this.reportRetryMaxCount = reportRetryMaxCount;
    }
}
